package cn.fengkuok.core.shared;

import java.util.ArrayList;
import java.util.List;

public class ResUtils {
	/**
     * 根据key从resource文件中读取list
     * 
     * @param key
     * @return list
     */
    @SuppressWarnings("rawtypes")
	public static List<KeyValueBean> getListFromRes(String string) {

        List<KeyValueBean> list = new ArrayList<KeyValueBean>();
        //BaseAction action = new BaseAction();
        //String[] all = action.getText(key).split(Constants.SEMICOLON);
        String[] all = string.split(Constants.SEMICOLON);
        for (String a : all) {
            KeyValueBean<String, String> bean = new KeyValueBean<String, String>();
            String[] pair = a.split(Constants.COLON);
            bean.setKey(pair[0]);
            bean.setValue(pair[1]);
            list.add(bean);
        }
        //System.out.println(action.getLocale());

        return list;
    }
    
    public static List<KeyValueBean> getDishStates() {
    	return null;
    }
    
    public static List<KeyValueBean> getSex() {
    	return null;
    }
}
